package com.yangjie.common;

public class DomainUtils {
	public static String getDomainName(String className) {
		int index = className.lastIndexOf(".");
		String domainName = null;
		if(index != -1) {
			className = className.substring(index + 1);
		}
		index = className.lastIndexOf("Service");
		if(index != -1) {
			domainName = className.substring(0, index);
		} else {
			domainName = className;
		}
		return domainName;
	}
}
